<!DOCTYPE html>
<script src="../../../resources/testharness.js"></script>
<script src="../../../resources/testharnessreport.js"></script>
<select size="2">
  <option>PASS</option>FAIL
</select>
<script>
var select = document.querySelector('select');

var div = select.appendChild(document.createElement('div'));
div.innerText = 'FAIL';
div.style.background = 'red';

// innerText uses the render tree, and the "FAIL" text (from either the initial 
// HTML or the dynamially inserted <div>) should not be in the render tree, thus 
// not appear.
test(() =>
  assert_equals(select.innerText, 'PASS'),
  'SELECT should not render other than OPTION and OPTGROUP');
</script>
